import java.util.Scanner;

public class 提取不重复的整数 {
    /*
    https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1?tpId=37&tqId=21232&ru=/exam/oj
    通过hash记录是否出现过即可
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        StringBuilder sb = new StringBuilder();
        int n = s.length;
        int[] hash = new int[10];
        for(int i = n - 1;i >= 0;i--){
            if(hash[s[i] - '0']++ == 0){
                sb.append(s[i]);
            }
        }
        System.out.println(sb.toString());
    }
}
